import './headernav.scss'
import {LeftOutlined} from '@ant-design/icons'
import {withRouter} from 'react-router-dom'
type Props = {
    history?:any,
    title?:string,
    backcolor?:string,
    color?:string
}

function Headernav(props: Props) {
  return (
    <div className='headernav' style={{backgroundColor:props.backcolor,color:props.color}}>
            <LeftOutlined style={{ fontSize:"0.2rem" }} onClick={()=>props.history.goBack()}/>
            <div className='title'>
                {props.title}
            </div>
        </div>
  )
}

export default withRouter(Headernav)